class StopCommand:
    def __init__(self, shared_state):
        """初始化 StopCommand"""
        self._shared_state = shared_state

    def execute(self, args=None):
        """停止两个相机的捕获"""
        print("停止左相机...")
        self._shared_state["left_camera_driver"].stopCapturing()
        print("停止右相机...")
        self._shared_state["right_camera_driver"].stopCapturing()
        self._shared_state["cameras_started"] = False
        print("所有相机已停止")
